package com.meituan.sdk.model.ddzhkh.finance.financeDeductDetail;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 账期对应调整明细
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/finance/deduct/detail",
    businessId = 59,
    apiVersion = "10007",
    apiName = "finance_deduct_detail",
    needAuth = true
)
public class FinanceDeductDetailRequest implements MeituanRequest<List<OpenDeductDetailDTO>> {
    /**
    * <p data-diff-id="ct-diff-id-8e13ed43-140e-433f-a3fa-3604573a7850">业务类型 1为团购，7为KTV预订</p>
    */
    @NotNull(message = "productCode不能为空")
    @SerializedName("productCode")
    private Integer productCode;
    /**
    * <p data-diff-id="ct-diff-id-1f6c425d-186a-4c3f-bcb9-de7ad1d5039b"><span style="color: ">偏移量</span></p>
    */
    @NotNull(message = "offset不能为空")
    @SerializedName("offset")
    private Integer offset;
    /**
    * <p data-diff-id="ct-diff-id-3730682b-7f5c-4199-a6ba-f1ac4199fc7d"><span style="color: ">账期ID</span></p>
    */
    @NotNull(message = "payPlanIdV2不能为空")
    @SerializedName("payPlanIdV2")
    private Long payPlanIdV2;
    /**
    * <p data-diff-id="ct-diff-id-760b6371-a44b-4e4d-a106-ebb3b971c909">记录数</p>
    */
    @NotNull(message = "limit不能为空")
    @SerializedName("limit")
    private Integer limit;
    /**
    * <p data-diff-id="ct-diff-id-390577c4-ebf7-4d03-b86a-13507d5e7ebf">账期ID(过期,使用pay_plan_id_v2进行传递)</p>
    */
    @SerializedName("payPlanId")
    private Integer payPlanId;

    public Integer getProductCode() {
        return productCode;
    }
    public void setProductCode(Integer productCode) {
        this.productCode = productCode;
    }
    public Integer getOffset() {
        return offset;
    }
    public void setOffset(Integer offset) {
        this.offset = offset;
    }
    public Long getPayPlanIdV2() {
        return payPlanIdV2;
    }
    public void setPayPlanIdV2(Long payPlanIdV2) {
        this.payPlanIdV2 = payPlanIdV2;
    }
    public Integer getLimit() {
        return limit;
    }
    public void setLimit(Integer limit) {
        this.limit = limit;
    }
    public Integer getPayPlanId() {
        return payPlanId;
    }
    public void setPayPlanId(Integer payPlanId) {
        this.payPlanId = payPlanId;
    }


    @Override
    public MeituanResponse<List<OpenDeductDetailDTO>> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<List<OpenDeductDetailDTO>>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "FinanceDeductDetailRequest{" + "productCode=" + productCode + "," + "offset=" + offset + "," + "payPlanIdV2=" + payPlanIdV2 + "," + "limit=" + limit + "," + "payPlanId=" + payPlanId + "}";
    }
}
